from utils.binocular_module_calibration.finetune_box import GetAnnotBoxLoc, display, change_rate_box
import cv2
import os
rgb_image_path = '/data/ICE/RGBCollection/rgb_images/2021_05_19_09_08_46_1621415326844.jpg'
gray_image_path = '/data/ICE/RGBCollection/cam1/images/cam12021_05_19_09_08_46_1621415326844.jpg'
xml_path = '/data/ICE/RGBCollection/cam1/xml/cam12021_05_19_09_08_46_1621415326844.xml'

base_image = cv2.imread(gray_image_path)
rgb_image = cv2.imread(rgb_image_path)

ObjBndBoxSet = GetAnnotBoxLoc(xml_path)
new_ObjBndBoxSet = change_rate_box(ObjBndBoxSet, 3, 2.7)
print(ObjBndBoxSet)
print(new_ObjBndBoxSet)
display(ObjBndBoxSet, base_image, 'display_base.jpg')
display(new_ObjBndBoxSet, rgb_image, 'display_rgb.jpg')

base_image_resize = cv2.resize(base_image, (1920, 1080))
display(new_ObjBndBoxSet, base_image_resize, 'display_resize_base.jpg')
